//
//  NBARefereeDept.swift
//  Sports
//
//  Created by tiger on 2017/10/16.
//  Copyright © 2017年 Meigabay. All rights reserved.
//

import UIKit

//裁判部
public class NBARefereeDept: NBADepartment {
    internal func sendReferee(game: NBAGame) throws -> NBAReferee {
        let referees = NBADBManager.shared.referees()
        if referees.count > 0 {
            return referees[0]
        }
        throw(NSError(domain: "裁判不足", code: 201, userInfo: [NSLocalizedDescriptionKey: "当前没有可用裁判"]))
    }
}
